<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="/favicon.ico" >
<LINK rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="/Public/Assets/Hui/lib/html5.js"></script>
<script type="text/javascript" src="/Public/Assets/Hui/lib/respond.min.js"></script>
<script type="text/javascript" src="/Public/Assets/Hui/lib/PIE_IE678.js"></script>
<![endif]-->
<link href="/Public/Assets/Hui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="/Public/Assets/Hui/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="/Public/Assets/Hui/lib/validator/jquery.validator.css" rel="stylesheet" type="text/css" />
<link href="/Public/Assets/Hui/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
<link href="/Public/Assets/Miniweb/lib/datepicker/dist/datepicker.min.css" rel="stylesheet" type="text/css" />
<link href="/Public/Assets/Hui/css/pagecss.css?v=1.0.0" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="/Public/Assets/Hui/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
<link rel="stylesheet" type="text/css" href="/Public/Assets/Miniweb/lib/treeTable/treeTable.css" />
<link href="/Public/Assets/Hui/lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="/Public/Assets/Hui/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>Administator管理后台</title>


</head>
<body>

<div class="pd-20">
	<form action="<?php echo u('Contentadmin/standard_post');?>" method="post" class="form form-horizontal validator_form close-dialog" id="form-article-add">
		<div id="tab-system" class="HuiTab">
			<div class="row cl">
				<label class="form-label col-2"><span class="c-red">*</span>模板名称：</label>
				<div class="formControls col-8">
					<input type="text" class="input-text" value="<?php echo ($info["title"]); ?>" placeholder="请输入模板名称" id="" name="title" data-rule="模板名称:required;">
				</div>
			</div>
			<div class="row cl">
					<label class="form-label col-2">模板描述：</label>
					<div class="formControls col-8">
						<textarea name="desc" cols="" rows="" class="textarea"  placeholder="说点什么...最少输入10个字符" datatype="*10-100" dragonfly="true" nullmsg="备注不能为空！" onKeyUp="textarealength(this,200)"><?php echo ($info["desc"]); ?></textarea>
						<p class="textarea-numberbar"><em class="textarea-length">0</em>/200</p>
					</div>
				</div>
			<div class="row cl">
				<label class="form-label col-2">规格：</label>
				<div class="formControls guige col-8">
					<div class="row cl">
						<label class="formControls col-2">规格名称</label>
						<label class="formControls col-8">规格属性</label>
						<label class="formControls col-2">操作</label>
					</div>
					<?php $list = json_decode($info['guige'],true); ?>
					<?php if($list): if(is_array($list)): foreach($list as $key=>$vo): ?><div class="row cl">
						<label class="formControls col-2"><input type="text" class="input-text" value="<?php echo ($key); ?>" placeholder="规格名称"  name="guige_name[]"></label>
						<label class="formControls col-8"><input type="text" class="input-text" value="<?php echo ($vo); ?>" placeholder="多个规格属性以','分隔"  name="guige_cichun[]"></label>
						<label class="formControls col-2">
							<a href="javascript:;"  style="text-decoration:none" class="delguige"><i class="Hui-iconfont"></i></a>
						</label>
					</div><?php endforeach; endif; ?>
					<?php else: ?>
					<div class="row cl">
						<label class="formControls col-2"><input type="text" class="input-text" value="" placeholder="规格名称"  name="guige_name[]"></label>
						<label class="formControls col-8"><input type="text" class="input-text" value="" placeholder="多个规格属性以','分隔"  name="guige_cichun[]"></label>
						<label class="formControls col-2">
							<a href="javascript:;"  style="text-decoration:none" class="delguige"><i class="Hui-iconfont"></i></a>
						</label>
					</div><?php endif; ?>
					<div class="row cl"><span class="addguige" style="cursor:pointer;">+添加</span></div>
				</div>
			</div>
		</div>
			
		
		<div class="row cl">
			<div class="col-10 col-offset-2">
				<input type="hidden" name="id" value="<?php echo ($info["id"]); ?>">
				<button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
				<button onClick="parent.close_iframe_dialog();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
			</div>
		</div>
	</form>
</div>


<script type="text/javascript" src="/Public/Assets/Hui/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/Public/Assets/Hui/lib/validator/jquery.validator.js"></script> 
<script type="text/javascript" src="/Public/Assets/Hui/lib/validator/local/zh_CN.js"></script> 
<script type="text/javascript" src="/Public/Sea/modules/layer/2.1/layer/layer.js"></script>
<script type="text/javascript" src="/Public/Assets/Miniweb/lib/datepicker/dist/datepicker.min.js"></script>
<script type="text/javascript" src="/Public/Assets/Miniweb/lib/datepicker/i18n/datepicker.zh-CN.js"></script>
<script type="text/javascript" src="/Public/Assets/Hui/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/Public/Assets/Hui/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script> 
<script type="text/javascript" src="/Public/Assets/Miniweb/lib/treeTable/treeTable.js"></script>
<script type="text/javascript" src="/Public/Assets/Hui/js/H-ui.js"></script> 
<script type="text/javascript" src="/Public/Assets/Hui/js/H-ui.admin.js"></script> 
<script type="text/javascript" src="/Public/Assets/Hui/lib/icheck/jquery.icheck.min.js"></script>
<script type="text/javascript" src="/Public/Assets/Miniweb/mini-admin.js"></script> 




<script type="text/javascript">
$(".addguige").on('click',function(){
	var html_guige = '';
	html_guige = '<div class="row cl">';
	html_guige += '<label class="formControls col-2"><input type="text" class="input-text" value="" placeholder="规格名称"  name="guige_name[]"></label>';
	html_guige += '<label class="formControls col-8"><input type="text" class="input-text" value="" placeholder="多个规格属性以\',\'分隔" name="guige_cichun[]"></label>';
	html_guige += '<label class="formControls col-2">';
	html_guige += '<a href="javascript:;"  style="text-decoration:none" class="delguige"><i class="Hui-iconfont"></i></a>';
	html_guige += '</label>';
	html_guige += '</div>';
	
	$(this).parent().before(html_guige);
})
$(document).on('click','.delguige',function(){
	$(this).parent().parent().remove();
})
</script>

</body>
</html>